package jsmc.opendata.pratikanant.activity;


import java.util.List;
import jsmc.opendata.nantes.modele.Equipement;
import jsmc.opendata.nantes.modele.Parking;
import jsmc.opendata.nantes.util.EquipementManager;
import jsmc.opendata.nantes.util.NeoLog;
import jsmc.opendata.pratikanant.MainGDActivity;
import jsmc.opendata.pratikanant.R;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.widget.TextView;

public class ParkingsDetailsActivity extends MainGDActivity {
    /** Called when the activity is first created. */

	public  List<Parking> p = null;
	final Handler mHandler = new Handler();
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setActionBarContentView(R.layout.parking_details);

        Intent itent = this.getIntent();
        Bundle bundle = itent.getExtras();
        
        int IdObj = bundle.getInt("IdObj");
        NeoLog.v("LB ParkingsDetailsActivity","IdObj: "+IdObj);
        
        Equipement equipement = EquipementManager.getInstance().getMapEquipements().get(IdObj);
        //NeoLog.v("LB ParkingsDetailsActivity","Adresse: "+equipement.getAdresse());
        
        
		((TextView) findViewById(R.id.parking_details_1)).setText(equipement.getNom());
		((TextView) findViewById(R.id.parking_details_2)).setText(equipement.getAdresse());
		((TextView) findViewById(R.id.parking_details_3)).setText(equipement.getCodePostal());
		((TextView) findViewById(R.id.parking_details_4)).setText(equipement.getCommune());
		
		((TextView) findViewById(R.id.parking_details_5)).setText(equipement.getTheme().getLabel());
		((TextView) findViewById(R.id.parking_details_6)).setText(equipement.getCategorie().getLabel());
		
		
    }
    
    
}